package com.yolo.listener;

import com.yolo.config.RabbitMQConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author ChenBo
 * @Date 2020/10/10
 * @Version 1.0
 */
@Component
public class GoodsListener {
    public  final static Logger logger= LoggerFactory.getLogger(GoodsListener.class);

    @RabbitListener(queues = {RabbitMQConfig.GOODS_AD_QUEUE})
    public void receiveGoods(String spuId){
        logger.info("获取到的广告信id：{}",spuId);
        //TODO-后续操作，进行redis更新，es数据同步等等
    }
}
